package com.tushare.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.tushare.dto.DailyBasicDto;
import com.tushare.entity.DailyBasic;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author jobob
 * @since 2021-03-08
 */
public interface DailyBasicMapper extends BaseMapper<DailyBasic> {

    boolean saveOrUpdateBatch(@Param("list") List<DailyBasic> list);

    int getStockBasicCount(@Param("ts_code") String ts_code);

    DailyBasic getLastStockBasic();

    DailyBasic getLastStockBasicByTsCode(@Param("ts_code") String ts_code);

    List<DailyBasic> getStockBasicByTsCode(@Param("ts_code") String ts_code);

    List<DailyBasic> getAllDailyBasic();

    List<DailyBasic> getLastDailyBasics(@Param("ts_code") String ts_code, @Param("count") int count);

    List<DailyBasicDto> getDailyBasicDto(@Param("ts_code") String ts_code);

    boolean deleteAllDailyBasic();

}
